package core.network.client2game.handler.union;

import business.global.club.ClubMember;
import business.global.club.ClubMgr;
import business.global.union.UnionMgr;
import business.player.Player;
import com.ddm.server.common.utils.CommTime;
import com.ddm.server.websocket.def.ErrorCode;
import com.ddm.server.websocket.exception.WSException;
import com.ddm.server.websocket.handler.requset.WebSocketRequest;
import com.google.gson.Gson;
import core.network.client2game.handler.PlayerHandler;
import core.network.http.proto.SData_Result;
import jsproto.c2s.iclass.club.CClub_GameTicketChange;
import jsproto.c2s.iclass.union.CUnion_MemberExamineOperate;
import jsproto.c2s.iclass.union.CUnion_SportsPointUpdate;

import java.io.IOException;
import java.util.Objects;

/**
 * 赛事成员裁定作弊
 * 中至制裁
 *
 * @author zaf
 *
 */
public class CUnionMemberCheatZhongZhi extends PlayerHandler {

	@SuppressWarnings("rawtypes")
	@Override
	public void handle(Player player, WebSocketRequest request, String message)
			throws WSException, IOException {
    	final CUnion_MemberExamineOperate req = new Gson().fromJson(message, CUnion_MemberExamineOperate.class);
		SData_Result result=UnionMgr.getInstance().getUnionMemberMgr().unionMemberCheatZhongZhi(req,player);
		if(ErrorCode.Success.equals(result.getCode())) {
			request.response(result.getData());
		} else {
			request.error(result.getCode(), result.getMsg());
		}

	}

}
